<!DOCTYPE html>
<!-- BEGIN html -->
<html dir="ltr" lang="en-US">
<!-- BEGIN head -->
<head>
	<!-- Meta Tags -->
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta name="description" content="Encode / Decode HTML Entities By MWcrew">
	<meta name="author" content="Muhammad Wafi">
	<!-- Title -->	
	<title>Encode / Decode HTML Entities</title>
	<!-- Styles -->
	<!--[if gte IE 9]><style type="text/css">* {filter: none!important;}</style><![endif]-->
<!-- 	<link rel="shortcut icon" href="favicon.ico"> -->
<script language="JavaScript">
//<![CDATA[
function init() {
XMLElement = document.getElementById("xml");
HTMLElement = document.getElementById("html");
}
function unescapeXML() {
var reGT = /&gt;/gi;
var reLT = /&lt;/gi;
var reQUOT = /&quot;/gi;
var reAMP = /&amp;/gi;
var reAPOS = /&apos;/gi;
var strHTML = XMLElement.value.replace(reGT, ">").replace(reLT,"<").replace(reQUOT,"\"").replace(reAMP,"&").replace(reAPOS,"'");
HTMLElement.value = strHTML;
HTMLElement.focus();
HTMLElement.select();
}
function escapeHTML () {
var reGT = />/gi;
var reLT = /</gi;
var reQUOT = /"/gi;
var reAMP = /&/gi;
var reAPOS = /'/gi;
var strXML = HTMLElement.value.replace(reAMP,"&amp;").replace(reQUOT,"&quot;").replace(reLT,"&lt;").replace(reGT, "&gt;").replace(reAPOS,"&apos;");
XMLElement.value = strXML;
XMLElement.focus();
XMLElement.select();
}
onload= init
//]]>
</script>
</head>
<style>
* {
	margin:0;
	padding:0;
}
body {
    font-family: sans-serif;
    line-height: 1.5;
}
h1 {
	font-family: segoe ui light;
	font-weight:200!important;
	margin-bottom:10px;
	color:#000;
}
textarea {
    background-color: #FFFFFF;
    border: 1px solid #ccc;
    border-radius: 4px 4px 4px 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) inset, 0 1px 0 rgba(255, 255, 255, 0.075);
    font-size: 16px;
    margin-bottom: 20px;
    font-family: Frutiger,"Frutiger Linotype",Univers,Calibri,"Gill Sans","Gill Sans MT","Myriad Pro",Myriad,"DejaVu Sans Condensed","Liberation Sans","Nimbus Sans L",Tahoma,Geneva,"Helvetica Neue",Helvetica,Arial,sans-serif !important;
    display: block;
    height: 250px;
    margin: 0 auto;
	padding:10px!important;
	resize:none;
    width: 600px;
}
textarea:focus {
	border: 1px solid #F90!important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) inset, 0 0 8px rgba(255, 155, 0, 0.6)!important;
}
textarea#html {
	-moz-box-sizing: border-box;
	-webkit-box-sizing: border-box;
	background:url(html.png)no-repeat scroll 99% 98% #FFFFFF;
	-moz-transition: background-position 0.3s ease-out 0s;
    -webkit-transition: background-position 0.3s ease-out 0s;
}
textarea#xml {
	-moz-box-sizing: border-box;
	-webkit-box-sizing: border-box;
	background:url(xml.png)no-repeat scroll 99% 98% #FFFFFF;
	-moz-transition: background-position 0.3s ease-out 0s;
    -webkit-transition: background-position 0.3s ease-out 0s;
}
textarea#html:focus, textarea#xml:focus {
    background-position: 110% 115%;
}
#content {
    margin: 25px auto;
    padding: 40px 25px 3px;
    position: relative;
    width: 600px;
}
footer {
    font-size: 12px;
	padding-top:10px;
    text-align: right;
	font-family:segoe ui!important;
}
footer a {
	color:#069!important;
}
footer a:hover {
	background:#FF9;
}
input[type="button"], input[type="reset"]{
	padding:7px 20px!important;
	background:#F90!important;
	color:#fff!important;
	border:1px solid #F60!important;
	cursor:pointer;
	font-family: segoe ui light!important;
	font-weight:200!important;
}
input[type="button"]:hover, input[type="reset"]:hover{
	background:#FC6!important;
	border-color:#FC6!important;
}
input[type="button"]:active, input[type="reset"]:active {
	border:1px solid #F90!important;
}
</style>
<body>
<div id="content">

<h1>Encode / Decode HTML Entities</h1>
<form>
			<textarea cols="80" rows="20" id="html" placeholder="Type your HTML code to be converted here..."></textarea>
            <div style='margin:10px 0;'>
				<input type="button" style='margin-right:5px;' onclick="escapeHTML()" value="Encode">
				<input type="button" style='margin-right:5px;' onclick="unescapeXML()" value="Decode">
                <input type="reset" value="Clear">
                </div>
            <textarea cols="80" rows="20" id="xml" placeholder="See the result..."></textarea>
</form>

<footer>
	<p>©2009-2013 <a rel="author" href="mailto:mwafiez@gmail.com">Muhammad Wafi</a>. <a href="http://mwcrew10.blogspot.com" target="_blank">MWcrew</a></p>
</footer>

<script>
	var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
	document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));

	try {
		var pageTracker = _gat._getTracker("UA-28209212-1");
		pageTracker._trackPageview();
	} catch(err) {}
</script><script src="http://www.google-analytics.com/ga.js" type="text/javascript"></script>
</div>
</body>